package com.mingtai.design.pattern.structuralming.decorator;

/**
 * @description: 抽象的装饰者
 * @author: mingtai
 * @createDate: 23:33 2021/1/11
 * @version: 1.0
 */

public class AbstractDecorator extends ABattercake {

    // 把抽象的煎饼放进来，通过这种方式，把抽象的装饰者与具体的煎饼建立联系
    private ABattercake aBattercake;

    public AbstractDecorator(ABattercake aBattercake) {
        this.aBattercake = aBattercake;
    }

    @Override
    protected String getDesc() {
        return this.aBattercake.getDesc();
    }

    @Override
    protected int cost() {
        return this.aBattercake.cost();
    }
}



